package com.umpay.feign.client;


import com.umpay.config.FeignLogConfiguration;
import com.umpay.dict.XmlData;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.dto.memberMgr.req.MemberPayAgreementsReq;
import com.umpay.dto.memberMgr.req.MemberQueryReq;
import com.umpay.dto.memberMgr.reqdep.MerDepInfRegReq;
import com.umpay.dto.memberMgr.res.MemberPayAgreementsRes;
import com.umpay.dto.memberMgr.res.MemberQueryRes;
import com.umpay.dto.memberMgr.res.MerInfRes;
import com.umpay.feign.hystrix.MemberDomainServerFeignClientHystrix;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

/*******************************************************************
 * description : 远程调用用户管理接口  
 * @author zhangru
 * @date 2018年2月8日 下午2:24:13
 * @version 1.0
 ******************************************************************/
@FeignClient(name = "memberDomain", configuration = FeignLogConfiguration.class, fallbackFactory = MemberDomainServerFeignClientHystrix.class)
public interface MemberDomainServerFeignClient {
 
    /**
     * @Title: getMerInfo  
     * @Description: 查询商户信息
     * @param @param merId
     * @return Message<MerInfRes>   返回类型  
     * @throws
     */
    @RequestMapping(value = "/memberDomain/v1/mer/merInfo/{merId}", method = RequestMethod.GET)
    @Cacheable(value = XmlData.CACHE_MERCHANT_INF, key = "'merId_'+#p0")
    public Message<MerInfRes> getMerInfo(@PathVariable("merId") String merId,@RequestParam("rpid") String rpid);
    
    /**
     * @Title: getMemberInfo  
     * @Description: 查询会员信息  
     * @param @param member
     * @return Body<MemberRes>    返回类型  
     * @throws
     */
    @RequestMapping(value = "/memberDomain/v1/mermeber/memberInfo/", method = RequestMethod.POST)
    public Message<MemberQueryRes> getMemberInfo(@RequestBody MemberQueryReq memberQueryReq);

    /**
     * @Title: getMemberPayAgreemeetsInf  
     * @Description: 查询用户支付协议
     * @param @param
     * @return Message<MemberPayAgreementsRes>    返回类型  
     * @throws
     */
    @RequestMapping(value = "/memberDomain/v1/mermeber/getMemberPayAgreemeetsInf/", method = RequestMethod.POST)
    public Message<MemberPayAgreementsRes> getMemberPayAgreemeetsInf(@RequestBody MemberPayAgreementsReq memberPayAgreementsReq);

 
    
     /*****************************************************************
     * merDepInfReg:(商户存管信息注册). 
     * @author wangpengbo 
     * @param merDepInfRegReq
     * @return
     *****************************************************************/ 
     
    @RequestMapping(value = "/memberDomain/v1/mer/merDepInfReg/", method = RequestMethod.POST)
    public Message<MerDepInfRegReq> merDepInfReg(@RequestBody MerDepInfRegReq merDepInfRegReq);

    
    /**
     * @Title: getMemberPayAgreemeetsInf  
     * @Description: 查询用户卡信息
     * @param @param
     * @return Message<MemberPayAgreementsRes>    返回类型  
     * @throws
     */
    @RequestMapping(value = "/memberDomain/v1/mermeber/getMemberCardsInf/", method = RequestMethod.POST)
    public Message<MemberPayAgreementsRes> getMemberCardsInf(@RequestBody MemberPayAgreementsReq memberPayAgreementsReq);
    
}
